package Exception;

import java.io.FileWriter;
import java.io.IOException;

public class ExceptionDemo1 {
	public static void main(String[] args) {
		try {
			System.out.println(2/0);
		}catch(ArithmeticException e) {
			// String getMassage():原因
//			System.out.println(e.getMessage());
			
			//String toString():类型和原因
//			System.out.println(e.toString());
			//void printStackTrace():类型原因和位置
			e.printStackTrace();
		}
	}
}
